/**
 * @file
 * @brief RTD模块：GPIO PINMAP
 * @author
 * + 隐星魂 (Roy Sun) <xwos@xwos.tech>
 * @copyright
 * + Copyright © 2015 xwos.tech, All Rights Reserved.
 * > Licensed under the Apache License, Version 2.0 (the "License");
 * > you may not use this file except in compliance with the License.
 * > You may obtain a copy of the License at
 * >
 * >         http://www.apache.org/licenses/LICENSE-2.0
 * >
 * > Unless required by applicable law or agreed to in writing, software
 * > distributed under the License is distributed on an "AS IS" BASIS,
 * > WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * > See the License for the specific language governing permissions and
 * > limitations under the License.
 */

#ifndef __RTD_gpio_h__
#define __RTD_gpio_h__

#include "board/std.h"
#include <xwcd/ds/soc/gpio.h>

/* LED */
#define GPO_LED_BLUE_PORT               XWDS_GPIO_PORT_D
#define GPO_LED_BLUE_PIN                XWDS_GPIO_PIN_13
#define GPO_LED_GREEN_PORT              XWDS_GPIO_PORT_B
#define GPO_LED_GREEN_PIN               XWDS_GPIO_PIN_5
#define GPO_LED_RED_PORT                XWDS_GPIO_PORT_B
#define GPO_LED_RED_PIN                 XWDS_GPIO_PIN_4

/* Button */
#define GPI_BUTTON_PORT                 XWDS_GPIO_PORT_D
#define GPI_BUTTON_PIN                  XWDS_GPIO_PIN_15

/* CAN0 */
#define CAN0_ERR_PORT                   XWDS_GPIO_PORT_E
#define CAN0_ERR_PIN                    XWDS_GPIO_PIN_8
#define CAN0_IRQ_PORT                   XWDS_GPIO_PORT_E
#define CAN0_IRQ_PIN                    XWDS_GPIO_PIN_7
#define CAN0_WKUP_PORT                  XWDS_GPIO_PORT_E
#define CAN0_WKUP_PIN                   XWDS_GPIO_PIN_2
#define CAN0_EN_PORT                    XWDS_GPIO_PORT_E
#define CAN0_EN_PIN                     XWDS_GPIO_PIN_1
#define CAN0_STB_PORT                   XWDS_GPIO_PORT_E
#define CAN0_STB_PIN                    XWDS_GPIO_PIN_0

#endif /* RTD/gpio.h */
